package com.xdhl.fu.order.controller;

import com.xdhl.fu.common.core.web.domain.AjaxResult;
import com.xdhl.fu.order.domain.vo.OrderInfoVO;
import com.xdhl.fu.order.service.IOrderInfoService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 订单相关统计控制器
 *
 * @author 朱力维
 * @time 2022/6/9 14:49
 */
@RestController
@RequestMapping("/total/order")
public class TotalOrderController {

    @Resource
    private IOrderInfoService orderInfoService;

    /**
     * 统计前16实时热门城市
     *
     * @return 统计前16实时热门城市
     */
    @GetMapping("/hot-city")
    public AjaxResult countHotCityTop16() {
        List<OrderInfoVO> orderInfoVOS = orderInfoService.countHotCityTop16();
        return AjaxResult.success(orderInfoVOS);
    }

}
